Add daemon-backed OpenCode npm plugin - #7
Draft
Stephen Belanger (Qard) wants to merge 9 commits into
Draft
Conversation
Stephen Belanger (Qard)
force-pushed
the
agent/opencode-daemon-integration
branch
from
August 5, 2026 18:11
99fe5ec to
f0928df
Compare
Stephen Belanger (Qard)
changed the base branch from
main
to
agent/trace-attach-run
August 5, 2026 18:11
Stephen Belanger (Qard)
force-pushed
the
agent/trace-attach-run
branch
from
August 5, 2026 18:22
33af1d6 to
23e3a4a
Compare
Stephen Belanger (Qard)
force-pushed
the
agent/opencode-daemon-integration
branch
from
August 5, 2026 18:22
f0928df to
b83b9ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@braintrust/trace-opencodeas monorepo-owned npm package content while preserving its four Braintrust data-access toolsbtCLI commands; the npm package contains no Braintrust HTTP client, API-key handling, or credential managementbtowns default-profile resolution, keychain/OAuth access, refresh, and backend routingbraintrust.plugin.<source>using the package version supplied by each JavaScript adapterValidation
make testmake validate-opencodebun test src/runtime/js-daemon-client/testscargo test --manifest-path bt-daemon/Cargo.toml --all-features --lockedcargo clippy --manifest-path bt-daemon/Cargo.toml --all-targets --all-features --locked -- -D warningsBT_AGENT_INFERENCE_MODE=mock BT_AGENT_INGEST_MODE=mock cargo test --manifest-path bt-daemon/Cargo.toml --all-features --locked --test agent_integration opencode_session_emits_traces -- --ignored --nocapture --test-threads=1using OpenCode 1.18.13 locallybt sync pushinput cleanupThe real-agent scenario installs the built npm tarball, loads it in the actual OpenCode CLI, calls deterministic mock inference, forwards native events over JSON-RPC, and verifies daemon-produced rows at mock Braintrust ingest. It also verifies shared OpenCode origin name and package version metadata.
Release safety
No npm package, marketplace repository, tag, or GitHub release was published. Real npm publishing requires an explicit release confirmation.
Merge dependency
This remains draft until the companion
btembedding implementsAuthProviderthrough its existing non-interactive profile resolver. The profile is optional and resolves to the default automatically when omitted.